/**
*      author: Y_Yao
*      created: 2025-03-15 12:20:15
**/

#include<bits/stdc++.h>

#define int LL
using namespace std;
using LL = long long;
const LL LLINF = 9e18;
const int INF = 0x3f3f3f3f;
const int N = 2e5 + 7;
int a,b,k;

bool check(int mid)
{
    int f = 0;
    int x = mid;
    while(mid)
    {
        mid /= 10;
        f++;
    }
    if(a * x + f * b <= k)
    {
        return true;
    }
    else return false;
}

void solve()
{
    cin >> a >> b >> k;
    int l = 0,r = 1e9;
    while(l < r)
    {
        int mid = (l + r + 1) >> 1;
        if(check(mid))
        {
            l = mid;
        }
        else
        {
            r = mid - 1;
        }
    }
    cout << l << endl;
}

signed main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);

    int t = 1;
    //cin >> t;
    while(t--)
    {
        solve();
    }
    return 0;
}

